import { BaseAIProvider } from './base';
import type { Model } from '../aiModels';

export class ClaudeProvider extends BaseAIProvider {
  constructor() {
    super(
      'claude',
      'Claude',
      'Anthropic Claude API服务',
      'https://api.anthropic.com'
    );
  }

  getDefaultModels(): Model[] {
    return [
      {
        id: 'claude-3-opus',
        name: 'Claude 3 Opus',
        maxTokens: 200000,
        available: true,
      },
      {
        id: 'claude-3-sonnet',
        name: 'Claude 3 Sonnet',
        maxTokens: 180000,
        available: true,
      },
      {
        id: 'claude-3-haiku',
        name: 'Claude 3 Haiku',
        maxTokens: 150000,
        available: true,
      },
      {
        id: 'claude-2.1',
        name: 'Claude 2.1',
        maxTokens: 100000,
        available: true,
      },
    ];
  }
  
  // 覆盖headers方法，因为Claude有特殊需求
  getHeaders(apiKey: string): Record<string, string> {
    return {
      'x-api-key': apiKey,
      'Content-Type': 'application/json',
      'anthropic-version': '2023-06-01',
    };
  }
} 